package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.JiajiaMappointsMapper;
import com.ruoyi.system.domain.JiajiaMappoints;
import com.ruoyi.system.service.IJiajiaMappointsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 小区区域Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-25
 */
@Service
public class JiajiaMappointsServiceImpl implements IJiajiaMappointsService 
{
    @Autowired
    private JiajiaMappointsMapper jiajiaMappointsMapper;

    /**
     * 查询小区区域
     * 
     * @param id 小区区域主键
     * @return 小区区域
     */
    @Override
    public JiajiaMappoints selectJiajiaMappointsById(Long id)
    {
        return jiajiaMappointsMapper.selectJiajiaMappointsById(id);
    }

    /**
     * 查询小区区域列表
     * 
     * @param jiajiaMappoints 小区区域
     * @return 小区区域
     */
    @Override
    public List<JiajiaMappoints> selectJiajiaMappointsList(JiajiaMappoints jiajiaMappoints)
    {
        return jiajiaMappointsMapper.selectJiajiaMappointsList(jiajiaMappoints);
    }

    /**
     * 新增小区区域
     * 
     * @param jiajiaMappoints 小区区域
     * @return 结果
     */
    @Override
    public int insertJiajiaMappoints(JiajiaMappoints jiajiaMappoints)
    {
        jiajiaMappoints.setCreateTime(DateUtils.getNowDate());
        return jiajiaMappointsMapper.insertJiajiaMappoints(jiajiaMappoints);
    }

    /**
     * 修改小区区域
     * 
     * @param jiajiaMappoints 小区区域
     * @return 结果
     */
    @Override
    public int updateJiajiaMappoints(JiajiaMappoints jiajiaMappoints)
    {
        jiajiaMappoints.setUpdateTime(DateUtils.getNowDate());
        return jiajiaMappointsMapper.updateJiajiaMappoints(jiajiaMappoints);
    }

    /**
     * 批量删除小区区域
     * 
     * @param ids 需要删除的小区区域主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaMappointsByIds(String ids)
    {
        return jiajiaMappointsMapper.deleteJiajiaMappointsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除小区区域信息
     * 
     * @param id 小区区域主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaMappointsById(Long id)
    {
        return jiajiaMappointsMapper.deleteJiajiaMappointsById(id);
    }
}
